﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RemoteServer.Framework.Handlers;
using System.Web;
using RemoteServer.Framework.Method;

namespace RemoteServer.Framework.ApplicationServer
{
    public class RemoteServerContext
    {
        #region Fields
        private RemoteServerRequest _remoteServerRequest;
        private RemoteServerResponse _remoteServerResponse;

        private MethodBase _method;

        private APIServer.APIServerContext _apiServerContext;
        #endregion

        #region Properties
        internal RemoteServerRequest RemoteServerRequest
        {
            get { return _remoteServerRequest; }
            set { _remoteServerRequest = value; }
        }


        internal RemoteServerResponse RemoteServerResponse
        {
            get { return _remoteServerResponse; }
            set { _remoteServerResponse = value; }
        } 
        #endregion

        #region Constructors
        public RemoteServerContext(HttpRequest request, HttpResponse response)
        {
            this._remoteServerRequest = new RemoteServerRequest(request);
            this._remoteServerResponse = new RemoteServerResponse(response);
            
        } 
        #endregion

        #region Methods
        public void Execute()
        { 
            //resolve prequest params
            this._method = this._remoteServerRequest.GetMethod();
        }
        #endregion
    }
}
